#ifndef __SYS_CFG_H__
#define __SYS_CFG_H__


#define MAX_ZONE 1
#define PAGE_SHIFT (12)
#define PAGE_SIZE  (1<<PAGE_SHIFT)
#define PAGE_MASK  (PAGE_SIZE-1)


#define ALIGN_HEAD_M(addr, mask)  ( ((word_kt)addr+(word_kt)mask) & (~((word_kt)(mask))) )
#define ALIGN_HEAD_N(addr, size)  ( ALIGN_HEAD_M( (addr), (size)-1) )
#define ALIGN_HEAD_S(addr, shift) ( ALIGN_HEAD_N( (addr), 1<<(shift) ) )

#define ALIGN_TAIL_M(addr, mask)  ( ((word_kt)(addr)) & (~((word_kt)(mask))) )
#define ALIGN_TAIL_N(addr, size)  ( ALIGN_TAIL_M( (addr), (size)-1) )
#define ALIGN_TAIL_S(addr, shift) ( ALIGN_TAIL_N( (addr), 1<<(shift) ) )

#endif
